﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CDB.LinqModel.Data;

namespace CDB.LinqModel
{
    public partial class Menus
    {
        #region Variable Declaration 
        private IDataRepository _dataObject;
        #endregion //Variable Declaration

        public Menus(IDataRepository dataObject)
            : this()
        {
            _dataObject = dataObject;
        }
        public void CreateMenu()
        {
            _dataObject.CreateMenu(this);
        }
        public void UpdateMenu()
        {
            _dataObject.UpdateMenu(this);
        }
        public void DeleteMenu()
        {
            _dataObject.DeleteMenu(this);
        }
        public List<Menus> GetMenuNameById()
        {
            return _dataObject.GetMenuNameById(this);
        }
        public void GetMenuByName()
        {
            _dataObject.GetMenuByName(this);
        }
        public List<Menus> GetMenuNameByParentId()
        {
            return _dataObject.GetMenuNameByParentId(this);
        }
        public List<Menus> GetParentMenus()
        {
            return _dataObject.GetParentMenus();
        }
        public void GetMenuById()
        {
            _dataObject.GetMenuById(this);
        }
        public List<Menus> GetAllMenus()
        {
            return _dataObject.GetAllMenus();
        }
    }
}
